clear;clc;

import Condition.Coil
import Atom.AlkaliMetal
import Gas.Gas
import Laser.AlkaliLaserBeam
import CellSystem.VacuumCell

%% Ingredients
coil = { ...
    Condition.Coil('coilx', 0.00001), ...
    Condition.Coil('coily', 0.0), ...
    Condition.Coil('coilz', 0.00003)};

rb85=Atom.AlkaliMetal('85Rb', coil);
rb87=Atom.AlkaliMetal('87Rb', coil);

temperature=273.15+20;
gases={  Gas(rb85, 'vapor', 'temperature', temperature, 'transition', Atom.Transition.D1, 'subspace', 'vacuum'), ...
         Gas(rb87, 'vapor', 'temperature', temperature, 'transition', Atom.Transition.D1, 'subspace', 'vacuum') ...
         };

pumpBeam=AlkaliLaserBeam(0.25e-6, ...                     % power in [W]
                         rb87, Atom.Transition.D1, -3064,...%-2.25e3, ... % ref Atom
                         [0 0 1], [1, 0], 2e-3);       % direction, pol, spot size


%%
t_pump = 10.0;
sys=VacuumCell(gases, pumpBeam.set_detuning(-1400));
vData=sys.velocity_resolved_pumping(3, t_pump, 'diagnose');
